for x in range(5): |
string = "" |
print(string) |
string = string + i |
print("Enter a character") |
i = input() |
for x in range(5): |
string = "" |
print(string) |
    string = string + i |
    print("Enter a character") |
    i = input() |
1 | string = "" |
2 | for x in range(5): |
3 |     print("Enter a character") |
4 |     i = input() |
5 |     string = string + i |
6 | print(string) |
print("Enter an item") |
string = "" |
string = string + i + " " |
i = input() |
for x in range(5): |
print(string) |
    print("Enter an item") |
string = "" |
    string = string + i + " " |
    i = input() |
for x in range(5): |
print(string) |
1 | string = "" |
2 | for x in range(5): |
3 |     print("Enter an item") |
4 |     i = input() |
5 |     string = string + i + " " |
6 | print(string) |
i = input() |
if c != "e": |
print(string) |
string = "" |
print("Enter a word") |
c = i[x] |
for x in range(len(i)): |
string = string + c |
i = input() |
    if c != "e": |
print(string) |
string = "" |
print("Enter a word") |
    c = i[x] |
for x in range(len(i)): |
        string = string + c |
1 | print("Enter a word") |
2 | i = input() |
3 | string = "" |
4 | for x in range(len(i)): |
5 |     c = i[x] |
6 |     if c != "e": |
7 |         string = string + c |
8 | print(string) |
if id == False: |
string = string + c |
print(string) |
for x in range(len(i)): |
string = "" |
id = c.isdigit() |
i = input() |
c = i[x] |
print("I will remove all digits from any string entered") |
    if id == False: |
        string = string + c |
print(string) |
for x in range(len(i)): |
string = "" |
    id = c.isdigit() |
i = input() |
    c = i[x] |
print("I will remove all digits from any string entered") |
1 | print("I will remove all digits from any string entered") |
2 | i = input() |
3 | string = "" |
4 | for x in range(len(i)): |
5 |     c = i[x] |
6 |     id = c.isdigit() |
7 |     if id == False: |
8 |         string = string + c |
9 | print(string) |
print("Enter a word") |
for x in range(len(i)): |
string = string + c |
i = input() |
string = "" |
print(string) |
c = i[x] |
if x % 2 == 0: |
print("Enter a word") |
for x in range(len(i)): |
        string = string + c |
i = input() |
string = "" |
print(string) |
        c = i[x] |
    if x % 2 == 0: |
1 | print("Enter a word") |
2 | i = input() |
3 | string = "" |
4 | for x in range(len(i)): |
5 |     if x % 2 == 0: |
6 |         c = i[x] |
7 |         string = string + c |
8 |          |
9 | print(string) |
else: |
print("Enter an item") |
for x in range(5): |
print(string) |
string = "" |
if x == 4: |
i = input() |
string += i + ", " |
string += i |
    else: |
    print("Enter an item") |
for x in range(5): |
print(string) |
string = "" |
    if x == 4: |
    i = input() |
        string += i + ", " |
        string += i |
1 | string = "" |
2 | for x in range(5): |
3 |     print("Enter an item") |
4 |     i = input() |
5 |     if x == 4: |
6 |         string += i |
7 |     else: |
8 |         string += i + ", " |
9 | print(string) |
print("Lower: " + l) |
l = l + c |
if c == c.upper(): |
for x in range(len(i)): |
u = u + c |
c = i[x] |
u = "" |
print("Enter a string of varying upper and lower case") |
else: |
print("Upper: " + u) |
l = "" |
i = input() |
print("Lower: " + l) |
        l = l + c |
    if c == c.upper(): |
for x in range(len(i)): |
        u = u + c |
    c = i[x] |
u = "" |
print("Enter a string of varying upper and lower case") |
    else: |
print("Upper: " + u) |
l = "" |
i = input() |
1 | print("Enter a string of varying upper and lower case") |
2 | i = input() |
3 | u = "" |
4 | l = "" |
5 | for x in range(len(i)): |
6 |     c = i[x] |
7 |     if c == c.upper(): |
8 |         u = u + c |
9 |     else: |
10 |         l = l + c |
11 | print("Upper: " + u) |
12 | print("Lower: " + l) |
string = string + i3 + " " |
i1 = int(i1) |
i2 = input() |
i1 = input() |
i2 = int(i2) |
string = "" |
print(string) |
for x in range(3): |
print("Enter two numbers") |
i3 = i1 + i2 |
i3 = str(i3) |
    string = string + i3 + " " |
    i1 = int(i1) |
    i2 = input() |
    i1 = input() |
    i2 = int(i2) |
string = "" |
print(string) |
for x in range(3): |
    print("Enter two numbers") |
    i3 = i1 + i2 |
    i3 = str(i3) |
1 | string = "" |
2 | for x in range(3): |
3 |     print("Enter two numbers") |
4 |     i1 = input() |
5 |     i2 = input() |
6 |     i1 = int(i1) |
7 |     i2 = int(i2) |
8 |     i3 = i1 + i2 |
9 |     i3 = str(i3) |
10 |     string = string + i3 + " " |
11 | print(string) |
for x in range(4): |
if x == 1: |
colour = colored.fg("red") |
string = "" |
if x == 2: |
string = string + colour + i + " " |
if x == 3: |
colour = colored.fg("green") |
if x == 0: |
colour = colored.fg("yellow") |
i = input() |
colour = colored.fg("blue") |
print(string) |
print("Enter 4 inputs") |
import colored |
for x in range(4): |
    if x == 1: |
        colour = colored.fg("red") |
string = "" |
    if x == 2: |
    string = string + colour + i + " " |
    if x == 3: |
        colour = colored.fg("green") |
    if x == 0: |
        colour = colored.fg("yellow") |
    i = input() |
        colour = colored.fg("blue") |
print(string) |
print("Enter 4 inputs") |
import colored |
1 | import colored |
2 | string = "" |
3 | print("Enter 4 inputs") |
4 | for x in range(4): |
5 |     i = input() |
6 |     if x == 0: |
7 |         colour = colored.fg("blue") |
8 |     if x == 1: |
9 |         colour = colored.fg("red") |
10 |     if x == 2: |
11 |         colour = colored.fg("yellow") |
12 |     if x == 3: |
13 |         colour = colored.fg("green") |
14 |     string = string + colour + i + " " |
15 | print(string) |
i = input() |
c = i[x] |
string = "" |
found = False |
for x in range(len(i)): |
found = True |
print("Enter a sentence with a full stop") |
string = string + c |
if c == ".": |
print(string) |
if found != True: |
else: |
i = input() |
    c = i[x] |
string = "" |
found = False |
for x in range(len(i)): |
            found = True |
print("Enter a sentence with a full stop") |
            string = string + c |
        if c == ".": |
print(string) |
    if found != True: |
        else: |
1 | print("Enter a sentence with a full stop") |
2 | i = input() |
3 | found = False |
4 | string = "" |
5 | for x in range(len(i)): |
6 |     c = i[x] |
7 |     if found != True: |
8 |         if c == ".": |
9 |             found = True |
10 |         else: |
11 |             string = string + c |
12 | print(string) |
c = i[x] |
print("Enter a sentence with a full stop") |
for x in range(len(i)): |
i = input() |
found = False |
string = string + c |
if found == True: |
if c == ".": |
string = "" |
found = True |
print(string) |
    c = i[x] |
print("Enter a sentence with a full stop") |
for x in range(len(i)): |
i = input() |
found = False |
        string = string + c |
    if found == True: |
    if c == ".": |
string = "" |
        found = True |
print(string) |
1 | print("Enter a sentence with a full stop") |
2 | i = input() |
3 | found = False |
4 | string = "" |
5 | for x in range(len(i)): |
6 |     c = i[x] |
7 |     if found == True: |
8 |         string = string + c |
9 |     if c == ".": |
10 |         found = True |
11 | print(string) |
12 |   |
if x % 4 == 1: |
if x % 4 == 3: |
colour = colored.fg("green") |
colour = colored.fg("yellow") |
string = "" |
print("Enter a sentence") |
i = input() |
c = i[x] |
print(string) |
colour = colored.fg("red") |
string = string + colour + c |
for x in range(len(i)): |
colour = colored.fg("blue") |
if x % 4 == 0: |
if x % 4 == 2: |
    if x % 4 == 1: |
    if x % 4 == 3: |
        colour = colored.fg("green") |
        colour = colored.fg("yellow") |
string = "" |
print("Enter a sentence") |
i = input() |
    c = i[x] |
print(string) |
        colour = colored.fg("red") |
    string = string + colour + c |
for x in range(len(i)): |
        colour = colored.fg("blue") |
    if x % 4 == 0: |
    if x % 4 == 2: |
1 | print("Enter a sentence") |
2 | i = input() |
3 | string = "" |
4 | for x in range(len(i)): |
5 |     c = i[x] |
6 |     if x % 4 == 0: |
7 |         colour = colored.fg("blue") |
8 |     if x % 4 == 1: |
9 |         colour = colored.fg("red") |
10 |     if x % 4 == 2: |
11 |         colour = colored.fg("yellow") |
12 |     if x % 4 == 3: |
13 |         colour = colored.fg("green") |
14 |     string = string + colour + c |
15 | print(string) |
string = string + colour + c |
print("Enter a sentence") |
colour = colored.fg("red") |
if cn == 2: |
if cn == 3: |
i = input() |
if cn == 1: |
cn = cn + 1 #Instead of lines 15,16,17 you could write cn = (cn + 1) % 4 |
c = i[x] |
colour = colored.fg("yellow") |
colour = colored.fg("blue") |
cn = 0 |
for x in range(len(i)): |
cn = 0 |
string = "" |
colour = colored.fg("green") |
if cn > 3: |
if cn == 0: |
if c == " ": |
print(string) |
    string = string + colour + c |
print("Enter a sentence") |
        colour = colored.fg("red") |
    if cn == 2: |
    if cn == 3: |
i = input() |
    if cn == 1: |
        cn = cn + 1 #Instead of lines 15,16,17 you could write cn = (cn + 1) % 4 |
    c = i[x] |
        colour = colored.fg("yellow") |
        colour = colored.fg("blue") |
cn = 0 |
for x in range(len(i)): |
            cn = 0 |
string = "" |
        colour = colored.fg("green") |
        if cn > 3: |
    if cn == 0: |
    if c == " ": |
print(string) |
1 | print("Enter a sentence") |
2 | i = input() |
3 | string = "" |
4 | cn = 0 |
5 | for x in range(len(i)): |
6 |     c = i[x] |
7 |     if cn == 0: |
8 |         colour = colored.fg("blue") |
9 |     if cn == 1: |
10 |         colour = colored.fg("red") |
11 |     if cn == 2: |
12 |         colour = colored.fg("yellow") |
13 |     if cn == 3: |
14 |         colour = colored.fg("green") |
15 |     if c == " ": |
16 |         cn = cn + 1 #Instead of lines 15,16,17 you could write cn = (cn + 1) % 4 |
17 |         if cn > 3: |
18 |             cn = 0 |
19 |     string = string + colour + c |
20 | print(string) |
string = string + c.upper() |
for x in range(len(i)): |
string = "" |
i = input() |
else: |
if higher == True: |
higher=True |
print(string) |
string = string + c |
elif c == " ": |
higher = False |
string = string + c.lower() |
print("Enter a sentence") |
higher = True |
c = i[x] |
        string = string + c.upper() |
for x in range(len(i)): |
string = "" |
i = input() |
    else: |
    if higher == True: |
higher=True |
print(string) |
        string = string + c |
    elif c == " ": |
        higher = False |
        string = string + c.lower() |
print("Enter a sentence") |
        higher = True |
    c = i[x] |
1 | print("Enter a sentence") |
2 | i = input() |
3 | string = "" |
4 | higher=True |
5 | for x in range(len(i)): |
6 |     c = i[x] |
7 |     if higher == True: |
8 |         string = string + c.upper() |
9 |         higher = False |
10 |     elif c == " ": |
11 |         higher = True |
12 |         string = string + c |
13 |     else: |
14 |         string = string + c.lower() |
15 | print(string) |